home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
src
/
lib
/
c
/
unixSyscall
/
RCS
/
close.c,v
< prev
next >
Wrap
Text File
|
1991-11-27
|
2KB
|
138 lines
head 1.3;
branch ;
access ;
symbols sprited:1.3.1;
locks ; strict;
comment @ * @;
1.3
date 89.01.06.08.03.57; author brent; state Exp;
branches 1.3.1.1;
next 1.2;
1.2
date 88.07.25.11.25.06; author ouster; state Exp;
branches ;
next 1.1;
1.1
date 88.06.19.14.31.05; author ouster; state Exp;
branches ;
next ;
1.3.1.1
date 91.11.27.13.12.51; author kupfer; state Exp;
branches ;
next ;
desc
@@
1.3
log
@Nuked user-level lock clean up. It isn't correct and is
correctly superceeded by kernel-level cleanup.
@
text
@/*
* close.c --
*
* Procedure to map from Unix close system call to Sprite.
*
* Copyright (C) 1986 Regents of the University of California
* All rights reserved.
*/
#ifndef lint
static char rcsid[] = "$Header: close.c,v 1.2 88/07/25 11:25:06 ouster Exp $ SPRITE (Berkeley)";
#endif not lint
#include <sprite.h>
#include <fs.h>
#include "compatInt.h"
/*
*----------------------------------------------------------------------
*
* close --
*
* Procedure to map from Unix close system call to Sprite Fs_Close.
*
* Results:
* UNIX_ERROR is returned upon error, with the actual error code
* stored in errno. UNIX_SUCCESS is returned upon success.
*
* Side effects:
* The steamId passed to close is no longer associated with an open
* file.
*
*----------------------------------------------------------------------
*/
int
close(streamId)
int streamId; /* identifier for stream to close */
{
ReturnStatus status; /* result returned by Fs_Close */
status = Fs_Close(streamId);
if (status != SUCCESS) {
errno = Compat_MapCode(status);
return(UNIX_ERROR);
} else {
return(UNIX_SUCCESS);
}
}
@
1.3.1.1
log
@Initial branch for Sprite server.
@
text
@d11 1
a11 1
static char rcsid[] = "$Header: /sprite/src/lib/c/unixSyscall/RCS/close.c,v 1.3 89/01/06 08:03:57 brent Exp $ SPRITE (Berkeley)";
@
1.2
log
@Lint.
@
text
@d11 1
a11 1
static char rcsid[] = "$Header: close.c,v 1.1 88/06/19 14:31:05 ouster Exp $ SPRITE (Berkeley)";
a17 6
/*
* Routines called from flock.c:
*/
extern void Unix_CloseLock();
a42 1
Unix_CloseLock(streamId);
@
1.1
log
@Initial revision
@
text
@d11 1
a11 1
static char rcsid[] = "$Header: close.c,v 1.3 88/01/11 18:21:02 deboor Exp $ SPRITE (Berkeley)";
d14 2
a15 2
#include "sprite.h"
#include "fs.h"
d17 6
@